1. Field of the Invention
The present invention relates to a method and apparatus for processing a video code, which can receive, as a original bit stream, a bit stream constituted by a video code, which is a digitized video signal, and then output any one of the original bit stream and a converted bit stream into which the original bit stream is code-converted. More particularly, the present invention relates to a method and apparatus for processing a video code, which can switch smoothly without disturbing a decoded picture when switching between the original bit stream and the converted bit stream.
2. Description of the Related Art
Conventionally, in this method for processing a video code, when a picture data serving as a video signal is encoded to generate a bit stream, a transcoding for converting a rate of the bit stream into a lower rate is carried out in order to reduce a band of a transmission path or a memory capacity.
For example, in a case of a standard type MPEG2 to compress or expand a color moving picture, a bit stream is transmitted as a transport stream from a transmission side through an antenna or a network to a reception side. If a band of the antenna or the network is low, the transmission side converts the transport stream into another transport stream of a lower rate. That is, the transmission is done after the execution of the transcoding.
When the reception side records the transport stream, there may be the limitations, such as an upper limit of a bit rate caused by a recorder or a record medium, an upper limit of a capacity and the like. The performance as a memory capacity of a recorder can be improved if the transport stream is converted into the transport stream of the lower rate when it is recorded, namely, if it is recorded after the execution of the transcoding.
Although there may be various methods for the transcoding, it can be attained by a combination of a decoder and an encoder as a simple method. In short, a bit stream is inputted to the decoder, and completely decoded. An output picture data is inputted to the encoder to then generate and output a bit stream of a desirable rate. However, this method carries out the processes for decoding and encoding the bit stream. Thus, the output bit stream is more delayed than the input bit stream by a time necessary for the respective decoding and encoding processes.
For example, in a case of a compression method using a correlation between frames such as the MPEG2, a time delay is induced because of a rearrangement of the frames. That is, a bidirectionally predictive encode picture (B picture) is accumulated in the bit stream in an order different from a picture display order. In a case of a typical MPEG2 stream of [M=3], when the decoding process is done, it brings about a delay corresponding to three frames. Moreover, even when the encoding process is done, it brings about a delay corresponding to three frames since it waits for an intra encode picture (I-picture) and a predictive encode picture (P-picture).
That is, the bit stream on which the transcoding is performed has the delay corresponding to six frames with respect to the input original bit stream. For this reason, the simply switching operation between the original bit stream and the bit stream on which the transcoding is performed causes the moving picture to be discontinuous. Switching between them by omitting the rearrangement of the frames so as not to bring about the time delay results in the disturbance of a screen since the decoding and encoding processes are not carried out normally.
Here, the method for perfectly decoding by using the decoder has been already described as the method for the transcoding. However, as another attaining method, for example, even a method for decoding up to a DCT (Discrete Cosine Transformation) area and again encoding and the like bring about the situation similar to the above-mentioned situation since the bit stream on which the transcoding is performed has the delay with respect to the original bit stream.
Conventionally, there are the proposals of the techniques with regard to a buffer control and a rate control of a bit stream itself on which the transcoding is performed. However, there is no information corresponding to a control with regard to a time difference between the original bit stream and the bit stream on which the transcoding is performed.
The above-mentioned conventional method and system for processing the video code have the problem that they can not generate the continuous moving pictures when switching from the bit stream on which the transcoding is performed to the original bit stream, or from the original bit stream to the bit stream on which the transcoding is performed, in the course of the bit stream.
This is because the bit stream on which the transcoding is performed has the delay corresponding to the time necessary for the transcoding process as compared with the original bit stream. Also, this is because the simply switching operation can not be done because of the difference of the bit stream structure caused by the encoding structure.